annual_landings = rfisheries::of_landings()
wio_countries = tibble(code = c("KEN", "TZA", "EAZ", "SYC", "ZAF", "MOZ",
"SOM", "MUS", "MYT", "MDG"),
name = c("Kenya", "Tanzania", "Zanzibar", "Seychelles",
"South Africa", "Mozambique", "Somalia",
"Mauritius", "Mayotte", "Madagascar")
)
landings_wio_list = list()
for (catches in 1:nrow(wio_countries)){
landings_wio_list[[catches]] = rfisheries::of_landings(country = wio_countries$code[catches]) %>%
rename(code = country) %>%
mutate(name = wio_countries$name[catches])
}
landings_wio_list_df = do.call(rbind, landings_wio_list)
landings_wio_list_df |> write_csv('landings_wio.csv')
catch_data = read_csv('presentations/landings_wio.csv')
catch_data |>
filter(!code %in% c('ZAF')) |>
tidyplot(x = year, y = catch, color = name) |>
add_areastack_absolute() |>
adjust_colors(new_colors = colors_discrete_friendly_long) |>
adjust_size(width = 3.0, height = 3.5, unit = 'in') |>
adjust_legend_title(title = "Country") |>
adjust_legend_position(position = c(.25,.8))|>
adjust_font(fontsize = 11) |>
adjust_y_axis(title = "Quantity Landed (MT)", breaks = scales::pretty_breaks(n = 6), labels = scales::comma) |>
adjust_x_axis(breaks = seq(1950, 2020, by = 10)) |>
remove_x_axis_title() |>
save_plot('presentations/plots/annual_catch_wio.svg')